package models

import "time"

// Template represents a catalog template record.
type Template struct {
	ID             int    `json:"id" db:"id"`
	Title          string `json:"title" db:"title"`
	Description    string `json:"description" db:"description"`
	ComplexityHint string `json:"complexityHint" db:"complexity_hint"`
}

// TemplateWithTags groups a template with its associated tag labels.
type TemplateWithTags struct {
	Template Template
	Tags     []string
}

// ProjectHistoryEntry captures a row from project_history joined with projects.
type ProjectHistoryEntry struct {
	ID          int64     `db:"id"`
	ProjectID   string    `db:"project_id"`
	ProjectName string    `db:"project_name"`
	Summary     string    `db:"summary"`
	Device      string    `db:"device"`
	PageCount   int       `db:"page_count"`
	Status      string    `db:"status"`
	OccurredAt  time.Time `db:"occurred_at"`
}

// ConfigurationGroup represents a preset group with nested options.
type ConfigurationGroup struct {
	ID       int                   `db:"id"`
	Key      string                `db:"key"`
	Title    string                `db:"title"`
	Subtitle string                `db:"subtitle"`
	Icon     string                `db:"icon"`
	Options  []ConfigurationOption `db:"-" json:"options"`
}

// ConfigurationOption represents an individual preset choice.
type ConfigurationOption struct {
	ID          int    `db:"id"`
	GroupID     int    `db:"group_id"`
	Key         string `db:"key"`
	Label       string `db:"label"`
	Description string `db:"description"`
}
